﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/User.Master" CodeBehind="ApplicationDetailSACC.aspx.cs" Inherits="CRMWeb.Pages.Application.ApplicationDetailSACC" %>

<%@ Register Src="~/UserControls/ApplicationProfile.ascx" TagPrefix="uc1" TagName="appProfile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <uc1:appProfile runat="server" ID="appProfile" />
    <div id="MainTab" style="width: auto; height: auto;">
        <div title=" Applicants " id="pnlApplicant">
        </div>
        <div title="Application Forms" id="pnlAppForms">
        </div>
        <div id="SaccTab" title="SACC" selected data-options="href:'/Pages/Application/ApplicationSACC.aspx?app_id='+getQuerystring('app_id', '')" style="padding: 20px; width: auto; height: auto;"></div>

        <div id="Historytab" title="History" data-options="href:'/Pages/Application/ApplicationHistory.aspx?app_id='+getQuerystring('app_id', '')" style="padding: 10px; width: auto; height: 300px;">
        </div>
        <div id="pnlContract" title="Contract" data-options="href:'/Pages/Application/Contract.aspx?app_id='+getQuerystring('app_id', ''),region:'center'" style="padding: 10px; width: auto; height: auto;">
        </div>
        <div id="pnlCreditCheck" title="Credit Check" data-options="href:'/Pages/Application/ApplicantCreditCheck.aspx?app_id='+getQuerystring('app_id', '')" style="padding: 10px; width: auto; height: auto;">
        </div>
        <%--<div id="pnlIDCheck" title="ID Check" style="padding: 10px; width: auto; height: auto;"></div>--%>
    </div>
    <script type="text/javascript">
        fnLeftNavSelected('A8');
        $('#MainTab').tabs({
            onSelect: function (title) {
                if (title == " Applicants ")
                    window.location.href = "/Pages/Contact/ContactDetail.aspx?contact_id=" + $('#ContentPlaceHolder1_appProfile_hdnContactID').val();
                else if (title == "Application Forms") {
                    $.ajax({
                        url: '/WebServices/ApplicationSACC.ashx?method=getAppFormIDcomesFrom',
                        data: { app_id: getQuerystring('app_id', '') },
                        success: function (data) {
                            if (data != '1') {
                                $.each(eval(data.replace(/[\r\n]/, '')), function (i, rec) {
                                    var newTab = window.open('/Pages/Application_Form.aspx?verified=0&id=' + rec.AppFormId + '&comesfrom=' + rec.comesfrom, '_blank');
                                    newTab.focus();
                                });
                            }
                        }
                    });


                }
            }
        });
        $(document).ready(function () {
            $('#SaccTab').css('width', 'auto');
        });

    </script>
    <style>
        .blueButton {
            height: 25px;
            width: auto;
            display: inline-block;
            color: #FFFFFF;
            font-size: 12px;
            font-family: Arial;
            background-color: #1A7BC9;
            border: 1px solid #1A7BC9;
        }

        .LableRed {
            color: red;
            font-size: 12.0pt;
        }
        .histrory_grid {
            width: 40%;
            float: left;
            height: auto;
            margin-top: 5px;
            margin-left: 5px;
        }

        .history_preview {
            width:auto;
            height: auto;
            margin-top: 5px;
        }
    </style>

</asp:Content>
